<?php include_once("header.html")?>

<div id="wrap">  <br />
<?php include_once("home_left.html")?>
    <div class="admincontent">
<?php include_once("home_assignmenttop.html")?>
	
	<br />
    <br />
    	<?php if($is_view){
    		if(!$assignmentinfo['a_quiz_pass']){
    			
    		
    		if(isset($quiz) && is_array($quiz)){?>

    <form action="<?php echo $www_site_url?>/index.php" method="post">
				<input type="hidden" name="action" value="home">
				<input type="hidden" name="op" value="doquiz">
				<input type="hidden" name="a_id" value="<?php echo $a_id;?>">
				<input type="hidden" name="num" value="<?php echo count($quiz);?>">
<?php if($do_quiz=='fail') echo "<div align='center'>".lang("test_notpass")."</div>";?>
<br />

		<table width="100%" cellpadding="10" cellspacing="1" class="missionReport" class="clear">

					<tr>
							<td class="title"><?php echo lang("ordernum")?></td>
							<td class="title"><?php echo lang("questions")?></td>
							<td class="title"><?php echo lang("options")?></td>
					</tr>
					<?php
	
							foreach ($quiz as $k=>$v){?>	
					<tr>
							<td valign="top" width="6%"><?php echo ($k+1).". ";?></td>
							<td valign="top" width="50%"><?php  if(isset($v['title'])) echo splitx($v['title']);?></td>
							
							<td>
							<ul class="quiz">
<?php if(isset($v['A'])) {?><li><label><input type="radio" name="option_<?php echo $k?>" value="A">A. <?php echo $v['A']?></label></li><?php }?>
<?php if(isset($v['B'])) {?><li><label><input type="radio" name="option_<?php echo $k?>" value="B">B. <?php echo $v['B']?></label></li><?php }?>
<?php if(isset($v['C'])) {?><li><label><input type="radio" name="option_<?php echo $k?>" value="C">C. <?php echo $v['C']?></label></li><?php }?>
<?php if(isset($v['D'])) {?><li><label><input type="radio" name="option_<?php echo $k?>" value="D">D. <?php echo $v['D']?></label></li><?php }?>
<input type="hidden" name="hida_<?php echo $k?>" value="<?php echo $v['answer'];?>">
							</ul>
							</td>
							
					</tr>
						
						<?php }
				
						?>
				</table>
				<table width="100%" height="50px">
					<tr class="nobg">
						<td align="center"><input type="submit" value="<?php echo lang('submit')?>" class="btn" /></td>
					</tr>
				</table>
  </form>
  <?php 
    		}
    		}else{
    			echo  "<p>&nbsp;</p><p>&nbsp;</p><div align='center'>".lang("pass_test")."</div>";
    		}
     }else{?>
   <p>&nbsp;</p>
   <p>&nbsp;</p>
   <p>&nbsp;</p>
  <div align="center"><?php echo lang("apply_first")?></div>
  <?php }?>
  </div>
</div>

<?php include_once("footer.html")?>
